<?php

class Application_Form_Project extends Zend_Form
{  
    
    public function init()
    {
        $this->setMethod('post');
        
        $id_proyek = new Zend_Form_Element_Hidden('id_proyek');
        
        $catatan_proyek = new Zend_Form_Element_Textarea('catatan_proyek');
        $catatan_proyek->setAttribs(array("cols" => 94, "rows" => 10));
        
        $status_proyek = new Zend_Form_Element_Select('status_proyek');
        $status_proyek->setLabel('Project Status')->setMultiOptions(array('buka' => 'Buka', 'batal' => 'Batal', 'pending' => 'Pending'));
    
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Add Project');
        
        $batal = new Zend_Form_Element_Button('batal');
        $batal->setLabel('Cancel');
        
        $summary = new Application_Form_ProjectSummary();
        $time = new Application_Form_ProjectTime();
        $anggota = new Application_Form_AnggotaTeamProject();
        $konsumen = new Application_Form_KonsumenForm();
        $genset = new Application_Form_SearchGensetForm();
        
        
        $this->addSubForm($summary, 'summary');
        $this->addSubForm($time, 'waktu');
        $this->addSubForm($anggota, 'anggota');
        $this->addSubForm($konsumen, 'konsumen');
        $this->addSubForm($genset, 'genset');
        
        $this->addElements(array($catatan_proyek, $status_proyek, $submit, $batal, $id_proyek));
    }
}

